package com.taojie.graduation.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 商品类型
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "category")
@ApiModel("商品类型")
public class Category {
    /**
     * 类目id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("类型id")
    private Integer id;

    /**
     * 类目名称
     */
    @ApiModelProperty("类型名称")
    @TableField(value = "name")
    private String name;

    /**
     * 父类目id,顶级类目填0
     */
    @ApiModelProperty("类型父id")
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 是否为父节点，0为否，1为是
     */
    @ApiModelProperty("是否为父id")
    @TableField(value = "is_parent")
    private Boolean isParent;
}